package com.nav.util;

public class Resolution {
	private AspectRatio ar;
	private int f;
	public Resolution(int w, int h) {
		f = AdvancedMath.GCD(w, h);
		ar = new AspectRatio(w / f, h / f);
	}
	public AspectRatio getAspectRatio() {
		return ar;
	}
	public String toString() {
		return f * ar.w + " x " + f * ar.h + " = " + f + " x (" + ar.w + " : " + ar.h + ")";
	}
	public static void main(String[] args) {
		Resolution r[] = {new Resolution(1920, 1080), new Resolution(1776, 1000)
		, new Resolution(1440, 480), new Resolution(1366, 768), new Resolution(1360, 768)
		, new Resolution(1280, 1024), new Resolution(1280, 960), new Resolution(1280, 800)
		, new Resolution(1280, 768), new Resolution(1280, 720), new Resolution(1152, 864)
		, new Resolution(1152, 648), new Resolution(1024, 768), new Resolution(800, 600)
		, new Resolution(720, 576), new Resolution(720, 480), new Resolution(640, 480)};
		for(int i = 0; i < r.length; i++)
			System.out.println(r[i]);
	}
}
